package com.uenpay.im.ui.old.activity.group;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.uenpay.im.IMApplication;
import com.uenpay.im.R;
import com.uenpay.util.app.base.BaseActivity;

/**
 * @author SL
 * @version 1.0
 * @copyRight http://www.qiyunxin.com
 * @E-mail:
 * @date 创建时间：2016-5-5 下午7:42:30
 * @function 创建群聊选择群聊类型
 */
public class ChooseCreateGroupTypeActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        isFullScreen = true;
        super.onCreate(savedInstanceState);
    }

    @Override
    public View bindView() {
        return null;
    }

    @Override
    public int bindLayout() {
        return R.layout.activity_choose_group_type_layout;
    }

    @Override
    public void initView(View view) {
        initView();
    }

    protected void initView() {
        ((TextView) findViewById(R.id.title_textview))
                .setText(R.string.choose_group_type);
        //返回键点击
        findViewById(R.id.back_layout).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View arg0) {
                finish();
            }
        });
    }

    public void ChooseGroupTypeOnClick(View view) {
        int viewId = view.getId();
        Intent intent = new Intent(ChooseCreateGroupTypeActivity.this,
                AddGroupMemberActivity.class);
        if (viewId == R.id.normal_group_layout) {
            intent.putExtra("group_type", GroupType.NORMAL_GROUP);

        } else if (viewId == R.id.funds_group_layout) {
            intent.putExtra("group_type", GroupType.AMOUNT_GORUP);

        }
        startActivity(intent);
        finish();
    }

    @Override
    public void onBackPressed() {
        finish();
        super.onBackPressed();
    }

}
